package TestDemo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2024-06-08
 * Time: 23:19
 */

interface IShape{
    public static final int a = 10;
    public abstract void draw();
    default public void test(){
        System.out.println("test()");
    }

    public static void test2(){
        System.out.println("stctic");
    }
}

class Rect implements IShape{
    @Override
    public void draw() {
        System.out.println("矩形");
    }
}

class Circle implements IShape{
    @Override
    public void draw() {
        System.out.println("圆形");
    }
}

class Flower implements IShape{
    @Override
    public void draw() {
        System.out.println("花朵");
    }
}
public class Test {
    public static void drawMap(IShape iShape){
        iShape.draw();
    }
    public static void main(String[] args) {
        drawMap(new Rect());
        drawMap(new Circle());
        drawMap(new Flower());
    }
}
